Change the file type and creator of any file dropped onto
this program. Prompts for the file type and creator, and
changes all files dropped at the same time to the same type
and creator.
Written by Brian Bechtel, based on code by Juri Munkki
Feel free to use the code in your programs.
v1.5 Modified by Pete R. Jemian, Late-Nite(tm) Software
Option was added to convert TEXT files to the
chosen system of EOL (end-of-line) characters. Note that EOLs
on DOS files are <CR><LF> (VAX also uses this EOL format)
on Mac files are <CR>
on UNIX files are <LF>
If you aren't bothered by this, that's just great. If you are, this little hack will surely help. Very useful for moving TEXT files between DOS, Mac, and UNIX machines
by diskNet (copy file onto disk, remove disk, sneaker it to other machine, ...).
BTW: The EOLconvert code reads the entire file into memory at one time, then does the conversion as the file is re-written.
WARNING: If you don't know what you are doing, things *could* get pretty fouled up. They might not. UNDO is not supported.
See the source code to determine *exactly* what is done.
The problem that *could* occur is that you mistakenly select a non-TEXT file along with other TEXT files and convert them all to type TEXT *and* convert the EOL characters to the selection of your choice. That's the danger. Don't do it.
You are unprotected against goofball errors like this.
v1.6 Modified by Mark Fleming <MarkF@Post.Queensu.CA>
- Added code to display the current setting of the file before any changes.
- Added option to only change type or creator
- Changed EOL code to use Finder temporary Memory and only change file of type 'TEXT'
- Added error checking and reporting routine
- Added Balloon Help for System 7's finder
- Added reading Application name for Creators entered from DeskTop database
if exists and display it next to create entered.
- read file header and check for correct header for "TIFF", "BMP", "GIFF", and "EPSF" and suggest the correct file type.
v1.7 changes by Mark Fleming, June 15th, 1994
- Added auto suggesting of correct file types for:
Format of the file (creator) - File Type
PICT files (ttxt-TeachText) - PICT
PhotoShop V2.5 files (8BIM) - 8BPS
Common Ground™ files (CGVM) - CGDC
JPEG (JIFF) files - JPEG
- Added autotype check for batching files,
if autotype of next file in the group dropped is different it will prompt you again.
- Converted to Codewarrior (next version will be a fat application PPC + 68K code).